package org.bees.cms.web.util.velocity;

import java.util.Map;

import org.apache.velocity.VelocityContext;

public class Context extends VelocityContext {

	public Context() {
		{ // 加入全局变量
			String prefix = Configuration.properties.getProperty("global.prefix");
			prefix = prefix == null ? "" : prefix + "-";
			for (Map.Entry<String, Object> entry : Configuration.globals.entrySet()) {
				String key = prefix + entry.getKey();
				Object value = entry.getValue();
				this.put(key, value);
			}
		}
	}

}
